package easy;

/**
 * @Description :
 * @Author : machong
 * @Date : 2022/3/15 2:17
 * @Version : 1.0
 **/
class leetCode01_twoSum {
    public int[] twoSum(int[] nums, int target) {
        int listSize = nums.length;
        int[] result = new int[2];
        for (int i = 0; i < listSize ; i++) {
            for (int j = 0; j < i; j++) {
                if (nums[i] + nums[j] == target){
                    result[0] = i;
                    result[1] = j;
                }
            }
        }
        return result;
    }
}
